/*******************************************************************************
 * Copyright (C) 2010 Devin Samarin.
 * 
 * This file is part of the SUIT Toolkit.
 * 
 * The SUIT Toolkit is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * The SUIT Toolkit is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with the SUIT Toolkit.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
package suit.ui;

import javax.microedition.lcdui.Graphics;

/**
 * This is mainly used for the widgets themselves so this won't be documented
 * for a while.
 * 
 * @author Devin Samarin
 * 
 */
public class Event {

	public static final int LongPress = 0;

	public static final int PointerPressed = 1; // int x, int y
	public static final int PointerDragged = 2;
	public static final int PointerReleased = 4;

	public static final int KeyPressed = 8; // int key
	public static final int KeyRepeated = 16;
	public static final int KeyReleased = 32;

	public static final int Expose = 64;
	public static final int Hide = 128;
	public static final int Show = 256;

	public static final int EnterNotify = 512; // int x, y
	public static final int LeaveNotify = 1024;

	public int type;
	public Widget widget;

	public int x;
	public int y;
	public int key;

	public Graphics graphics;
	public Theme theme;

	public Event(int type) {
		this.type = type;
	}

	public Event(int type, Graphics g, Theme theme) {
		this.type = type;
		this.graphics = g;
		this.theme = theme;
	}

	public Event(int type, int key) {
		this.type = type;
		this.key = key;
	}

	public Event(int type, int x, int y) {
		this.type = type;
		this.x = x;
		this.y = y;
	}

}